package cn.sc.summer.gateway.config;

import com.alibaba.nacos.api.naming.pojo.Instance;
import com.alibaba.nacos.client.naming.core.Balancer;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * 类名：负载均衡自定义规则
 *
 * @author a-xin
 * @date 2024/5/11 09:06
 */
@Slf4j
public class CustomizeLoadBalance extends Balancer {

    /**
     * 根据自定义规则选择
     */
    public static Instance getHostByRandomWeightCopy(List<Instance> hosts) {
        return getHostByRandomWeight(hosts);
    }

}
